package _2025_3_12;

public class demo7 {
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(() -> {
            System.out.println("此线程名称" + Thread.currentThread().getName());
        }, "a");
        Thread t2 = new Thread(() -> {
            System.out.println("此线程名称" + Thread.currentThread().getName());
        }, "b");
        Thread t3 = new Thread(() -> {
            System.out.println("此线程名称" + Thread.currentThread().getName());
        }, "c");
        Thread[] threads = {t1, t2, t3};
        for (int i = threads.length-1; i >=0 ; i--) {
            threads[i].start();
            threads[i].join();
        }
    }
}
